![]() |
ControlUserPaneFocusProcPtr |
||||
Header: | ControlDefinitions.h | Carbon status: | Supported | |
Handles keyboard focus.
typedef ControlPartCode(* ControlUserPaneFocusProcPtr) ( ControlRef control, ControlFocusPart action );
You would declare your function like this if you were to name it MyControlUserPaneFocusCallback:
ControlPartCode MyControlUserPaneFocusCallback ( ControlRef control, ControlFocusPart action );
A handle to the control that is to adjust its focus.
The part code of the user pane to receive keyboard focus; see ControlDefProcPtr.
The part of the user pane actually focused. kControlFocusNoPart is returned if the user pane has lost the focus or cannot be focused.0
The Control Manager defines the data type ControlUserPaneFocusUPP to identify the universal procedure pointer for this application-defined function:
typedef UniversalProcPtr ControlUserPaneFocusUPP;
You typically use the NewControlUserPaneFocusProc macro like this:
ControlUserPaneFocusUPP myControlUserPaneFocusUPP;
myControlUserPaneFocusUPP = NewControlUserPaneFocusProc (MyControlUserPaneFocusCallback);
You typically use the CallControlUserPaneFocusProc macro like this:
CallControlUserPaneFocusProc(myControlUserPaneFocusUPP, control, action);
Your MyControlUserPaneFocusCallback function is called in response to a change in keyboard focus. It should respond by changing keyboard focus based on the part code passed in the action parameter. This function is called only if you’ve set the kControlSupportsFocus feature bit on creation of the user pane control.
Once you have provided a user pane application-defined function, you can call the function SetControlData in order to associate your function with a control. User pane application-defined functions are identified to SetControlData by tag constants; for a description of the tag constants, see the “Control Manager Constants” section. For example, once you have created the function MyControlUserPaneFocusCallback, pass kControlUserPaneFocusProcTag in the tagName parameter of SetControlData.
This function is available with Appearance Manager 1.0 and later.
Supported in Carbon.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)